#lang racket

(require "utils.rkt")
(provide lat? member?)

;; list l contains only atoms?
(define lat?
  (lambda (l)
    (cond
      ((null? l) #t)
      ((atom? (car l)) (lat? (cdr l)))
      (else #f)
      )))

;; list lat has atom a?
(define member?
  (lambda (a lat)
    (cond
      ((null? lat) #f)
      ;((eq? (car lat) a) #t)
      (else (or (eq? (car lat) a)
                (member? a (cdr lat))))
      )))